## API Report File for "@backstage/plugin-splunk-on-call"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
/// <reference types="react" />

import { ApiRef } from '@backstage/core-plugin-api';
import { BackstagePlugin } from '@backstage/core-plugin-api';
import { ConfigApi } from '@backstage/core-plugin-api';
import { DiscoveryApi } from '@backstage/core-plugin-api';
import { Entity } from '@backstage/catalog-model';
import { JSX as JSX_2 } from 'react';
import { RouteRef } from '@backstage/core-plugin-api';

// @public (undocumented)
export type ClientApiConfig = {
  eventsRestEndpoint: string | null;
  discoveryApi: DiscoveryApi;
};

// @public (undocumented)
export const EntitySplunkOnCallCard: (
  props: EntitySplunkOnCallCardProps,
) => JSX_2.Element;

// @public (undocumented)
export type EntitySplunkOnCallCardProps = {
  readOnly?: boolean;
};

// @public (undocumented)
export type EscalationPolicyInfo = {
  policy: EscalationPolicySummary;
  team?: EscalationPolicyTeam;
};

// @public (undocumented)
export type EscalationPolicyResponse = {
  policies: EscalationPolicyInfo[];
};

// @public (undocumented)
export type EscalationPolicySummary = {
  name: string;
  slug: string;
  _selfUrl: string;
};

// @public (undocumented)
export type EscalationPolicyTeam = {
  name: string;
  slug: string;
};

// @public (undocumented)
export type Incident = {
  incidentNumber?: string;
  startTime?: string;
  currentPhase: IncidentPhase;
  entityState?: string;
  entityType?: string;
  routingKey?: string;
  alertCount?: number;
  lastAlertTime?: string;
  lastAlertId?: string;
  entityId: string;
  host?: string;
  service?: string;
  pagedUsers?: string[];
  pagedTeams?: string[];
  entityDisplayName?: string;
  pagedPolicies?: EscalationPolicyInfo[];
  transitions?: IncidentTransition[];
  firstAlertUuid?: string;
  monitorName?: string;
  monitorType?: string;
  incidentLink?: string;
};

// @public (undocumented)
export type IncidentPhase = 'UNACKED' | 'ACKED' | 'RESOLVED';

// @public (undocumented)
export type IncidentsResponse = {
  incidents: Incident[];
};

// @public (undocumented)
export type IncidentTransition = {
  name?: string;
  at?: string;
  by?: string;
  message?: string;
  manually?: boolean;
  alertId?: string;
  alertUrl?: string;
};

// @public (undocumented)
export const isSplunkOnCallAvailable: (entity: Entity) => boolean;

// @public (undocumented)
export type ListRoutingKeyResponse = {
  routingKeys: RoutingKey[];
  _selfUrl?: string;
};

// @public (undocumented)
export type ListUserResponse = {
  users: User[];
  _selfUrl?: string;
};

// @public (undocumented)
export type MessageType =
  | 'CRITICAL'
  | 'WARNING'
  | 'ACKNOWLEDGEMENT'
  | 'INFO'
  | 'RECOVERY';

// @public (undocumented)
export type OnCall = {
  team?: OnCallTeamResource;
  oncallNow?: OnCallNowResource[];
};

// @public (undocumented)
export type OnCallEscalationPolicyResource = {
  name?: string;
  slug?: string;
};

// @public (undocumented)
export type OnCallNowResource = {
  escalationPolicy?: OnCallEscalationPolicyResource;
  users?: OnCallUsersResource[];
};

// @public (undocumented)
export type OnCallsResponse = {
  teamsOnCall: OnCall[];
};

// @public (undocumented)
export type OnCallTeamResource = {
  name?: string;
  slug?: string;
};

// @public (undocumented)
export type OnCallUser = {
  username?: string;
};

// @public (undocumented)
export type OnCallUsersResource = {
  onCalluser?: OnCallUser;
};

// @public (undocumented)
export type RequestOptions = {
  method: string;
  headers: HeadersInit;
  body?: BodyInit;
};

// @public (undocumented)
export type RoutingKey = {
  routingKey: string;
  targets: RoutingKeyTarget[];
  isDefault: boolean;
};

// @public (undocumented)
export type RoutingKeyTarget = {
  policyName: string;
  policySlug: string;
  _teamUrl: string;
};

// @public (undocumented)
export interface SplunkOnCallApi {
  getEscalationPolicies(): Promise<EscalationPolicyInfo[]>;
  getIncidents(): Promise<Incident[]>;
  getOnCallUsers(): Promise<OnCall[]>;
  getRoutingKeys(): Promise<RoutingKey[]>;
  getTeams(): Promise<Team[]>;
  getUsers(): Promise<User[]>;
  incidentAction(request: TriggerAlarmRequest): Promise<Response>;
}

// @public (undocumented)
export const splunkOnCallApiRef: ApiRef<SplunkOnCallApi>;

// @public (undocumented)
export class SplunkOnCallClient implements SplunkOnCallApi {
  constructor(config: ClientApiConfig);
  // (undocumented)
  static fromConfig(
    configApi: ConfigApi,
    discoveryApi: DiscoveryApi,
  ): SplunkOnCallClient;
  // (undocumented)
  getEscalationPolicies(): Promise<EscalationPolicyInfo[]>;
  // (undocumented)
  getIncidents(): Promise<Incident[]>;
  // (undocumented)
  getOnCallUsers(): Promise<OnCall[]>;
  // (undocumented)
  getRoutingKeys(): Promise<RoutingKey[]>;
  // (undocumented)
  getTeams(): Promise<Team[]>;
  // (undocumented)
  getUsers(): Promise<User[]>;
  // (undocumented)
  incidentAction(options: TriggerAlarmRequest): Promise<Response>;
}

// @public (undocumented)
export const SplunkOnCallPage: {
  (props: SplunkOnCallPageProps): JSX.Element;
  defaultProps: {
    title: string;
    subtitle: string;
    pageTitle: string;
  };
};

// @public (undocumented)
export type SplunkOnCallPageProps = {
  title?: string;
  subtitle?: string;
  pageTitle?: string;
};

// @public (undocumented)
const splunkOnCallPlugin: BackstagePlugin<
  {
    root: RouteRef<undefined>;
  },
  {}
>;
export { splunkOnCallPlugin as plugin };
export { splunkOnCallPlugin };

// @public (undocumented)
export type Team = {
  name?: string;
  slug?: string;
  memberCount?: number;
  version?: number;
  isDefaultTeam?: boolean;
  _selfUrl?: string;
  _policiesUrl?: string;
  _membersUrl?: string;
  _adminsUrl?: string;
};

// @public (undocumented)
export type TriggerAlarmRequest = {
  routingKey?: string;
  incidentType: MessageType;
  incidentId?: string;
  incidentDisplayName?: string;
  incidentMessage?: string;
  incidentStartTime?: number;
};

// @public (undocumented)
export class UnauthorizedError extends Error {}

// @public (undocumented)
export type User = {
  firstName?: string;
  lastName?: string;
  displayName?: string;
  username?: string;
  email?: string;
  createdAt?: string;
  passwordLastUpdated?: string;
  verified?: boolean;
  _selfUrl?: string;
};
```
